//
//  NewsListCell.m
//  LianShangBao
//
//  Created by 主事丫环HU on 2020/9/2.
//  Copyright © 2020 主事丫环. All rights reserved.
//

#import "NewsListCell.h"
@interface NewsListCell()
@property (weak, nonatomic) IBOutlet UITextView *titleTextView;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;

@end
@implementation NewsListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.titleTextView.userInteractionEnabled = NO;
}
+ (instancetype)cellWithTableView:(UITableView *)tableView {
    
    static NSString *ID = @"NewsListCell";
    
    NewsListCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        
        cell = [NSBundle.mainBundle loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil].firstObject;
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (void)setModel:(NewsListModel *)model {
    self.titleTextView.text = model.title;
    self.timeLabel.text = model.createDate;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
